import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:totaldemo/getx/controller.dart';
import 'package:totaldemo/getx/dependency_put_find_nextpage.dart';

class LazyPutNextPage extends GetView<LazyController> {
  const LazyPutNextPage({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('懒加载的第二个界面'),
      ),
      body: Center(
        child: Column(
          children: [
            Obx(() => Text('value -> ${controller.count}')),
            Divider(),
            ElevatedButton(
                onPressed: () {
                  controller.add();
                },
                child: Text('add'))
          ],
        ),
      ),
    );
  }
}
